<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<meta charset="utf-8">
<head th:include="include :: header"></head>
<body class="white-bg">
	<div class="wrapper wrapper-content animated fadeInRight ibox-content">
		<form class="form-horizontal m" id="form-gen-modify">
			<div class="form-group">
				<label class="col-sm-3 control-label">作者：</label>
				<div class="col-sm-8">
					<input id="author" name="author" class="form-control"
						type="text" th:value="${property.author}">
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-3 control-label">邮箱：</label>
				<div class="col-sm-8">
					<input id="email" name="email" class="form-control" type="text"
						th:value="${property.email}" readonly>
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-3 control-label">包名：</label>
				<div class="col-sm-8">
					<input id="package" name="package" class="form-control"
						type="text" th:value="${property.package}">
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-3 control-label">自动去掉表前缀：</label>
				<div class="col-sm-2  i-checks icheckbox_square-green checked">
					<input id="autoRemovePre" name="autoRemovePre"
						class="form-control" type="checkbox"
						value="true" th:checked="${property.autoRemovePre}">
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-3 control-label">去掉指定表前缀：</label>
				<div class="col-sm-8">
					<input id="tablePrefix" name="tablePrefix" class="form-control" type="text" th:value="${property.tablePrefix}">
				</div>
			</div>
		</form>
	</div>
	<div th:include="include::footer"></div>
	<script type="text/javascript">
		var prefix = ctx + "tool/gen";

		$("#form-gen-modify").validate({
			rules : {
				author: {
					required: true
				},
				email: {
					required: true
				},
				package: {
					required: true
				}
			}
		});
		function submitHandler() {
			if ($.validate.form()) {
				$.operate.save(prefix + "/modify", $('#form-gen-modify').serialize());
			}
		}
	</script>
</body>
</html>
